export const dataBase = {
  jiaofeiqudao: [
    {
      label: '全部',
      value: '',
    },
    {
      label: '导航付费',
      value: 'NavSupport',
    },
    {
      label: '农服app',
      value: 'AgriApp',
    },
  ],

  jiaofeixiangmu: [
    {
      label: '全部',
      value: '',
    },
    {
      label: 'RTK服务费',
      value: 'DRONE_RTK',
    },
    {
      label: '橙心服务费',
      value: 'DRONE_SERVICE',
    },
    {
      label: '自动掉头',
      value: 'NAV_AC_AUTO_TURN',
    },
    {
      label: 'ISOBUS',
      value: 'NAV_AC_ISOBUS',
    },
    {
      label: '导航服务费',
      value: 'NAV_SERVICE',
    },
    {
      label: '维修服务费',
      value: 'REPAIR_ORDER',
    },
  ],
  /**
     * // 存储
      STORAGE,
      // 欠费
      ARREARS,
      // 已支付
      PAYED,
      // 已完成
      COMPLETED,
      // 取消
      CANCELED
     */
  weixiudanzhuangtai: [
    {
      label: '全部',
      value: '',
    },
    {
      label: '存储',
      value: 'STORAGE',
    },
    {
      label: '欠费',
      value: 'ARREARS',
    },
    {
      label: '已支付',
      value: 'PAYED',
    },
    {
      label: '已完成',
      value: 'COMPLETED',
    },
    {
      label: '取消',
      value: 'CANCELED',
    },
  ],
  /**
   * NAV 导航 DRONE 无人机 DRONE_PERSONAL 无人机个人
   */
  weixiudanleixing: [
    {
      label: '导航',
      value: 'NAV',
    },
    {
      label: '无人机',
      value: 'DRONE',
    },
    {
      label: '无人机个人',
      value: 'DRONE_PERSONAL',
    },
  ],
}
export function getValueById(type, id) {
  if (dataBase[type]) {
    const arr = dataBase[type]
    const result = arr.find((item) => item.value === id)
    return result && result.label ? result.label : id
  }
}
export function caseIndex(index) {
  switch (index) {
    case 'HD':
      return '惠达'
    case '1':
      return '农新'
    case 'HG':
      return '寰果'
    case '10':
      return '星网智能'
    case '12':
      return '昆仑北斗'
    case '13':
      return '超星智能'
    case '14':
      return '褱安'
    case '15':
      return '智慧北斗'
    case '16':
      return '山东易如'
    case '20':
      return '金凤花'
    default:
      return index
  }
}
export function dinglogin() {
  window.location.href = 'https://sso.huidatech.cn/sso/auth/dingTalkOauth2?platform=UserDataAdmin'
}
